﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Shipwire.Messages
{
    [XmlRootAttribute("SubmitOrderResponse")]
    public class FulfillmentResponse
    {
        public string Status { get; set; }
        public string ErrorMessage { get; set; }

        public int TotalOrders { get; set; }
        public int TotalItems { get; set; }
        public string TransactionId { get; set; }

        [XmlArray("OrderInformation")]
        [XmlArrayItem("Order")]
        public OrderResponse[] Orders;
    }

    public class OrderResponse
    {
        [XmlAttribute("number")]
        public string Number { get; set; }
        [XmlAttribute("id")]
        public string Id { get; set; }
        [XmlAttribute("status")]
        public string Status { get; set; }

        public string Exception { get; set; }

        [XmlArray("WarningList")]
        [XmlArrayItem("Warning")]
        public string[] Warning { get; set; }
    }
}
